/*
 * VarBit - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
public class VarBit {
	private int anInt822;
	public static int anInt823;
	public static VarBit[] aVarBitArray824;
	public String aString825;
	public int anInt826;
	public int anInt827;
	public int anInt828;
	public boolean aBoolean829 = false;
	public int anInt830 = -1;
	public int anInt831;
	public boolean aBoolean832 = true;

	public static void method451(Archive archive, int i) {
		Packet packet = new Packet(archive.method154(
			"varbit.dat", null));
		if (i == 36135) {
			VarBit.anInt823 = packet.getUShort();
			if (VarBit.aVarBitArray824 == null) {
				VarBit.aVarBitArray824 = new VarBit[VarBit.anInt823];
			}
			for (int i_0_ = 0; i_0_ < VarBit.anInt823; i_0_++) {
				if (VarBit.aVarBitArray824[i_0_] == null) {
					VarBit.aVarBitArray824[i_0_] = new VarBit();
				}
				VarBit.aVarBitArray824[i_0_].method452(-954, i_0_, packet);
				if (VarBit.aVarBitArray824[i_0_].aBoolean829) {
					Varp.varps[VarBit.aVarBitArray824[i_0_].anInt826].aBoolean716 = true;
				}
			}
			if (packet.offset != packet.payload.length) {
				System.out.println("varbit load mismatch");
			}
		}
	}

	public void method452(int i, int i_1_, Packet packet) {
		if (i >= 0) {
			anInt822 = -151;
		}
		for (;;) {
			int i_2_ = packet.getUByte();
			if (i_2_ == 0) {
				break;
			}
			if (i_2_ == 1) {
				anInt826 = packet.getUShort();
				anInt827 = packet.getUByte();
				anInt828 = packet.getUByte();
			} else if (i_2_ == 10) {
				aString825 = packet.getString();
			} else if (i_2_ == 2) {
				aBoolean829 = true;
			} else if (i_2_ == 3) {
				anInt830 = packet.getInt();
			} else if (i_2_ == 4) {
				anInt831 = packet.getInt();
			} else if (i_2_ == 5) {
				aBoolean832 = false;
			} else {
				System.out.println("Error unrecognised config code: " + i_2_);
			}
		}
	}
}
